import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from './components/Home'
import PublishBlog from './components/PublishBlog'
import Blog from './components/Blog'

Vue.use(VueRouter)

export default new VueRouter({
    mode: "history",
    routes: [
        {path: "*", redirect: "/"},
        {name: "Home", path: "/", component: Home},
        {name: "PublishBlog", path: "/publishblog", component: PublishBlog},
        {path: "/publishblog/:id", component: PublishBlog},
        {name: "Blog", path: "/blog/:id", component: Blog}
    ]
})